﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace Chillis.CRM.Data
{
    public class DRedSocial : Conexion
    {
        /*
        static DRedSocial()
        {
        }
        private DRedSocial()
        {
        }

        private static DRedSocial _instancia = new DRedSocial();
        public static DRedSocial Instancia
        {
            get { return _instancia; }
        }

        #region Helper Publicacion

        private RedSocial CreaRedSocial(DataRow fila)
        {
            var publicacion = new RedSocial();

            publicacion.IdRedSocial = fila.Field<int>("IdRedSocial");
            publicacion.Descripcion = fila.Field<string>("Descripcion");

            return publicacion;
        }

        private IList<RedSocial> CreaRedSocial(DataTable tabla)
        {
            var lista = new List<RedSocial>();

            foreach (DataRow fila in tabla.Rows)
            {
                lista.Add(CreaRedSocial(fila));
            }

            return lista;
        }

        #endregion

        public IList<RedSocial> ObtenerRedSocial()
        {

            string qry = "usp_ObtenerRedSocial";

            var db = CrearBaseDatos();
            var ds = db.ExecuteDataSet(qry);


            return CreaRedSocial(ds.Tables[0]);

        }
        */
    }
}
